Release 10.1A: OpenEdge Data Management:
SQL Reference


AVG

Computes the average of a collection of values. The keyword DISTINCT specifies that the duplicate values are to be eliminated before computing the average.

Syntax

AVG ( { [ ALL ] expression } | { DISTINCT column_ref } ) 

Example

This example illustrates the AVG function:

SELECT AVG (salary)
     FROM employee
     WHERE deptno = 20 ; 

Notes


Copyright © 2005 Progress Software Corporation
www.progress.com
Voice: (781) 280-4000
Fax: (781) 280-4095